package com.yeyks.service;

import com.yeyks.dal.domain.UserInfo;
import com.yeyks.dal.domain.VipOrder;
import com.yeyks.dal.domain.UserInfo;
import com.yeyks.dal.domain.VipOrder;

import java.util.Map;

/**
 * @Author fuchangshuai
 * @date 2019/3/15 12:31 PM
 */
public interface VipOrderService {
    /**
     * 用户充值
     *
     * @param userInfo
     * @param price
     * @param inviteId
     * @param type
     * @return
     */
    Map<String,String> vipPay(UserInfo userInfo, String inviteId, Integer price, String type, String ip);

    /**
     * h5用户用户充值
     *
     * @param userInfo
     * @param price
     * @param inviteId
     * @param type
     * @param openId
     * @param flag
     * @return
     */
    Map<String,Object> h5VipPay(UserInfo userInfo, String inviteId, Integer price, String type, String ip, String openId, Boolean flag);

    /**
     * 通过订单号查询订单
     *
     * @param outTradeNo
     * @return
     */
    VipOrder selectOrderByOrderNo(String outTradeNo);

    /**
     * 处理充值回调
     *
     * @param outTradeNo
     * @param flag
     */
    void payCallback(String outTradeNo, Boolean flag);

    /**
     * 充值取消后去支付
     *
     * @param userInfo
     * @param orderNo
     * @param type
     * @param ip
     * @return
     */
    Map<String,String> goPay(UserInfo userInfo, String orderNo, String type, String ip);
}
